<?php



/**
 * @author bkrueger
 *
 *
 */
class Appfront_views_helpers_Templatefile extends Zend_View_Helper_Abstract {


	protected $_viewPaths;

	function __construct() {

		//ViewPfade filtern und speichern
		$view = new Zend_View();
		
		$this->_viewPaths = $view->getScriptPaths();

	}
	
	public function templatefile($file)
	{
		
		$config			= Zend_Registry::get('configSystem');
		$config_layout 	= $config->layouts;
		
		//Templatepfade
		$templatepath 	= $config->templatepath;
		$templates 		= array();
		
		//Seitenpfad
		$sitepath 		= $config->site->path;
		
		
		$path = '';
		
		
		foreach ($config_layout as $layout){
		
		
		$path = 'http://'.HTTP_HOST.''.$sitepath.''.$templatepath.'/'.$layout.'/'.$file;
		
		}
		
		return $path;
	}
	
	
}


?>